networkx已安装,但无法导入。没有名为'networkx'的模块 |
您所在的位置:网站首页 › pip 无法升级 › networkx已安装,但无法导入。没有名为'networkx'的模块 |
我有一种答案,但我不认为它是真的好...... By following the NoModuleNamed指南, I first checked the sys.executable in python import sys print(sys.executable)它给出了这样的结论。 /bin/python3然后,我试着在那里安装networkx,使用的是 "网络 "中的说明。NoModuleNamed指南并在networkx的安装指南: [JohnRambo@Machine ~]$ /bin/python3 -m pip install networkx[default]仅供参考,我得到了这个结果(安装后)。 Requirement already satisfied: networkx[default] in ./.local/lib/python3.6/site-packages (2.5.1) WARNING: networkx 2.5.1 does not provide the extra 'default' Requirement already satisfied: decorator=4.3 in ./.local/lib/python3.6/site-packages (from networkx[default]) (4.4.2)现在,python里面的import networkx命令没有给我任何错误,但是 if I check the networkx installation from Terminal [JohnRambo@Machine ~]$ pytest networkx, I still get ERROR: file not found: networkx, and that version of networkx is the 2.5.1 while I would like the 2.6 one.一旦我试图通过命令升级 networkx [JohnRambo@Machine ~]$ /bin/python3 -m pip install --upgrade networkx[default]我得到这个消息。 Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: networkx[default] in ./.local/lib/python3.6/site-packages (2.5.1) WARNING: networkx 2.5.1 does not provide the extra 'default' Requirement already satisfied: decorator=4.3 in ./.local/lib/python3.6/site-packages (from networkx[default]) (4.4.2)在/bin/python3内安装还是可以的,还是说这不是一个正确的做法? 我怎样才能升级我的网络x? |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |